package edu.kjxy.day02Synchronized.synNotExtends;

/**
 * 功能:同步不可以继承
 * 作者:程序员欧阳子韩
 * 日期:2024/2/1 20:29
 */
public class RunTest {
    public static void main(String[] args) {
        Sub subRef = new Sub();
        MyThreadA myThreadA = new MyThreadA(subRef);
        myThreadA.setName("A");
        myThreadA.start();
        MyThreadB myThreadB = new MyThreadB(subRef);
        myThreadB.setName("B");
        myThreadB.start();
    }
}
